package 实现类.作业;

import java.util.Scanner;

public class zuoye1 {
    public static void main(String[] args) {
        Scanner input =new Scanner(System.in);
        System.out.println("请输入邮箱");
        String a=input.next();
        String f=a.substring(a.indexOf(".com"));
        /*if (!a.equals(".com")){
            System.out.println("输入错误");
        }else {

        }*/

        if (a.lastIndexOf("@")==-1){
            System.out.println("邮箱格式不正确");
        }else if (!f.equals(".com")){
            System.out.println("输出错误");
        }else{
            if (a.lastIndexOf("@")<a.lastIndexOf(".")){
                System.out.println("------");
            }else {
                System.out.println("邮箱格式不正确");
            }
        }
    }
}
